package com.qdaily.ui.net.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * 评论节点
 * Created with IntelliJ IDEA.
 * User: Felix
 * Date: 3/30/15
 * Time: 18:14
 * QQ:74104
 * Email:lovejiuwei@gmail.com
 */
public class CommentMeta implements Parcelable {
    private int id = 0;
    private String content = "";
    private long publish_time = 0;
    private int comment_count = 0;
    private int praise_count = 0;
    private List<CommentChildFeed> child_comments = new ArrayList<CommentChildFeed>();
    private AuthorFeed author = new AuthorFeed();

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getPublish_time() {
        return publish_time;
    }

    public void setPublish_time(long publish_time) {
        this.publish_time = publish_time;
    }

    public int getComment_count() {
        return comment_count;
    }

    public void setComment_count(int comment_count) {
        this.comment_count = comment_count;
    }

    public int getPraise_count() {
        return praise_count;
    }

    public void setPraise_count(int praise_count) {
        this.praise_count = praise_count;
    }

    public List<CommentChildFeed> getChild_comments() {
        return child_comments;
    }

    public void setChild_comments(List<CommentChildFeed> child_comments) {
        this.child_comments = child_comments;
    }

    public AuthorFeed getAuthor() {
        return author;
    }

    public void setAuthor(AuthorFeed author) {
        this.author = author;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.content);
        dest.writeLong(this.publish_time);
        dest.writeInt(this.comment_count);
        dest.writeInt(this.praise_count);
        dest.writeTypedList(this.child_comments);
        dest.writeParcelable(author, 0);
    }

    @Override
    public int describeContents() {
        return 0;
    }

}
